package com.feign.service;

import com.bean.TestBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient("compute-service-c")
@Repository
public interface TestService {

    /**
     * 调取博客名称
     *
     * @return 博客名称
     */
    @GetMapping("/c/info")
    String info();

    @GetMapping("/list")
    List<Map> list();

    @PostMapping("/c/send")
    String send(@RequestParam("test") String test, @RequestParam("ll") Long ll);

    @PostMapping("/c/send1")
    String send1(@RequestBody TestBean test);
}
